export const fileTypeList = [
  {
    value: 'jpg',
    label: 'jpg'
  },
  {
    value: 'jpeg',
    label: 'jpeg'
  },
  {
    value: 'png',
    label: 'png'
  },
  {
    value: 'doc',
    label: 'doc'
  },
  {
    value: 'docx',
    label: 'docx'
  },
  {
    value: 'pdf',
    label: 'pdf'
  },
  {
    value: 'ppt',
    label: 'ppt'
  },
  {
    value: 'pptx',
    label: 'pptx'
  },
  {
    value: 'xls',
    label: 'xls'
  },
  {
    value: 'xlsx',
    label: 'xlsx'
  },
  {
    value: 'txt',
    label: 'txt'
  }
]

export const taskStatusList = [
  {
    value: 1,
    label: '待审核'
  },
  {
    value: 2,
    label: '审核中'
  },
  {
    value: 3,
    label: '审核成功'
  },
  {
    value: 4,
    label: '审核失败'
  }
]

const enums = {
  taskStatusList,
  fileTypeList
}

export function getEnumLabel (val, E) {
  // 主要用在列表中
  const tmpList = enums[E].filter(item => item.value === val)
  return tmpList.length > 0 ? tmpList[0].label : '--'
}
